package job.sqb;

import java.util.*;

/**
 * Author: Zhang Dongwei
 * Date: 2023/9/9 13:48
 * 7,6;6,5;5,4;4,3;3,2;2,1;9,8
 */
public class sqb1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
        String[] split = s.split(";");
        int countryCount = split.length;
        int[] [] countryRelation = new int[countryCount][2];
        for (int i = 0; i < countryCount; i++){
            countryRelation[i][0] = Integer.parseInt(split[i].split(",")[0]);
            countryRelation[i][1] = Integer.parseInt(split[i].split(",")[1]);
        }
        
        System.out.println(split.length);
    }
}
